# The Kband Mapping: see README.md.
import math

allline = []
ans = []

def center(n: int, m: int, center: int, p: bool = True) -> float:
    if p: print("n = {0:}, m = {1:}, center_raw = {2:}, center = {3:}".format(n, m, center, center + (m - n) / 2))
    return (center + (m - n) / 2)


def right_band(n: int, m: int, i: int, b: int, p: bool = True) -> int:
    if p: print("Right = ", center(n, m, i, p = False) + (m - n) / 2)
    return int( min( center(n, m, i, p = p) + (m - n) / 2 + b, m - 1 ) )

def left_band(n: int, m: int, i: int, b: int, p: bool = True) -> int:
    if p: print("Left = ", center(n, m, i, p = False) - (m - n) / 2)
    return int( max( center(n, m, i, p = False) - (m - n) / 2 - b, 0 ) )


def insideBand(x, y, band, n, m) -> bool:
    if x < 0 or y < 0 or x >= n or y >= m: return False
    # print("(x, y) = (", x, ",", y, ")", "dis =", abs(y - (x + (m - n) / 2)), "?", (m - n) / 2)
    return abs(y - (x + (m - n) / 2)) <= band + (m - n) / 2

def Mapping(x, y, k, n, m, p: bool = True) -> int:
    longest = right_band(n, m, n / 2, k, p = False) - left_band(n, m, n / 2, k, p = False) + 1
    if(x == 0): return abs(y - x)
    firstline = right_band(n, m, 0, k, p = False) - left_band(n, m, 0, k, p = False) + 1
    if firstline == longest:
        if p: print("A", end = ' ')
        return x * longest + y - left_band(n, m, x, k, p = False)
    else:
        ans = 0
        thisline = right_band(n, m, x, k, p = False) - left_band(n, m, x, k, p = False) + 1
        if thisline == longest:
            beforeall = longest - firstline + 1 # find the first line which has m elements in the band
            ans += beforeall * (longest + firstline) // 2
            firstm = longest - firstline # get lines **before** this line which has m elements
            alllinesum = x - 1 - firstm
            ans += alllinesum * longest
            ans += y - left_band(n, m, x, k, p = False)
            if p: print("B", end = ' ')
            return ans
        elif thisline - firstline == x:
            ans += (thisline - 1 + firstline) * x // 2
            ans += y - left_band(n, m, x, k, p = False)
            if p: print("C", end = ' ')
            return ans
        else:
            # if p: print("thisline = ", thisline, sep = None, end = ' ')
            beforeall = longest - firstline + 1 # find the first line which has m elements in the band
            ans += beforeall * (longest + firstline) // 2
            # if p: print("beforeall = ", ans, end = ", ")
            firstm = longest - firstline # get lines **before** this line which has m elements
            # use this line find the last line which has m elements in the band
            lastm = n - 1 - (longest - firstline)
            ans += longest * (lastm - firstm)
            # if p: print("firstm =", firstm, ", lastm =", lastm, end = '?')
            afterall = longest - thisline - 1
            ans += afterall * (longest + thisline) // 2
            # if p: print("Afterall = ", afterall, ", x = ", (longest + thisline))
            # if p: print("ans = ", ans, end = '!')
            # info: not included this line
            ans += y - left_band(n, m, x, k, p = False) 
            if p: print("D", end = ' ')
            return ans
    

if __name__ == '__main__':
    n, m = map(int, input().split())
    band = int(input())
    if(n > m):
        print("\033[0;31mERROR: n > m. Please swap n and m and try again.\033[0m")
        exit(1)
    # The process of counting the number of elements in band is O(n^2)    
    allline = [0 for i in range(n)]
    for i in range(n):
        for j in range(m):
            allline[i] += insideBand(i, j, band, n, m)
    print(allline)
    for i in range(1, n):
        allline[i] += allline[i - 1]
    print(allline)
    # m > n
    for i in range(n):
        left = left_band(n, m, i, band, False)
        right = right_band(n, m, i, band, False)
        for j in range(left, right + 1):
            if (insideBand(i, j, band, n, m) == False): continue
            print(i, j, end = ' ')
            print(Mapping(i, j, band, n, m))
            ans.append(Mapping(i, j, band, n, m, p = False))
    ans = list(set(ans))
    max_len = max(n - 1 - band, 0)
    real_sum = n * m - max_len * (max_len + 1)
    print(allline[-1], len(ans) == allline[-1])
    print(real_sum, len(ans) == real_sum)